package com.crazypos.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.crazypos.pojo.RoleEntity;
import com.crazypos.pojo.UserEntity;
import com.crazypos.pojo.bo.AdminCreateUserBO;
import com.crazypos.pojo.bo.AdminUpdateOwnerBO;
import com.crazypos.pojo.bo.GetUserListBO;
import com.crazypos.pojo.bo.UserLoginBO;

import java.util.List;

public interface IUserService extends IService<UserEntity> {
    Integer countUserByAccount(String account);

    Integer countUserByEmail(String email);

    String userLoginAndCreateToken(UserLoginBO userLoginBO) throws Exception;

    UserEntity getUserByAccnount(String account);

    List<RoleEntity> selectRolesByUserId(String userId);

    Integer countUserByAccountAndOrgId(String account, String organizationId);

    Integer countUserByPinAndOrgId(String organizationId, String pin);

    void adminCreateUser(AdminCreateUserBO createUserBO, String userType, String adminId);

    IPage<UserEntity> getUserList(GetUserListBO bo, String userType);

    void adminUpdateOwner(AdminUpdateOwnerBO bo);
}
